package de.doegel.common.model;

import com.j256.ormlite.field.DatabaseField;

public class AbstractMessage {
	public static final String idKey = "emailid";
	public static final String fromtoIdKey = "absenderID";
	public static final String fromtoNameKey = "absender";
	public static final String fromtoImageURLKey = "pfad";
	public static final String dateKey = "time";
	public static final String subjectKey = "betreff";
	public static final String contentKey = "mailtext";
	public static final String statusKey = "status";
	public static final String readKey = "gelesen";
	
	@DatabaseField(id = true)
	public int id;
	
	@DatabaseField
	public int fromtoId;
	
	@DatabaseField(canBeNull = false)
	public String fromtoName;
	
	@DatabaseField(canBeNull = false)
	public String fromtoImageURL;
	
	@DatabaseField(canBeNull = false)
	public String date;
	
	@DatabaseField(canBeNull = false)
	public String subject;
	
	@DatabaseField(canBeNull = false)
	public String content;
	
	@DatabaseField
	public int status;
	
	@DatabaseField
	public boolean read;
	
	public AbstractMessage() {
		// needed by ormlite
	}

	@Override
	public String toString() {
		return content;
	}
}
